package com.pda.xinma.adapter;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.pda.xinma.R;
import com.pda.xinma.bean.WholePalletInfoBean;
import com.wangshen.base.ui.mvp.base.adapter.BaseAdapter;

import java.util.List;

public class CheckingAdapter extends BaseAdapter<WholePalletInfoBean.DetailsBean> {
    public CheckingAdapter(int layoutResId, @Nullable List<WholePalletInfoBean.DetailsBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, WholePalletInfoBean.DetailsBean item) {
        super.convert(helper, item);
        helper.setText(R.id.tv_title,item.getProOrderNo());
        if (item.getStatus().equals("10")){
            helper.setText(R.id.tv_states,"未盘");
            helper.setTextColor(R.id.tv_states,getContext().getResources().getColor(R.color.md_red_A700));
        }else {
            helper.setText(R.id.tv_states,"已盘");
            helper.setTextColor(R.id.tv_states,getContext().getResources().getColor(R.color.md_green_A700));
        }

    }
}
